\documentclass[paper=a4, fontsize=11pt]{scrartcl} % A4 paper and 11pt font size

\usepackage[T1]{fontenc} % Use 8-bit encoding that has 256 glyphs
\usepackage{fourier} % Use the Adobe Utopia font for the document - comment this line to return to the LaTeX default
\usepackage[english]{babel} % English language/hyphenation
\usepackage{amsmath,amsfonts,amsthm} % Math packages
\usepackage[UTF8]{ctex}
\usepackage{xcolor}
\usepackage{listings}
\usepackage{tikz}
\usepackage{lipsum} % Used for inserting dummy 'Lorem ipsum' text into the template
\usepackage{clrscode}
\usepackage{sectsty} % Allows customizing section commands
\usepackage[framed,numbered,autolinebreaks,useliterate]{mcode}
\usepackage{multirow}
\usepackage{graphicx}
\usepackage{float}
\usetikzlibrary{graphs}
\usetikzlibrary{shapes.arrows}
\allsectionsfont{\centering \normalfont\scshape} % Make all sections centered, the default font and small caps

\usepackage{fancyhdr} % Custom headers and footers
\pagestyle{fancyplain} % Makes all pages in the document conform to the custom headers and footers
\fancyhead{} % No page header - if you want one, create it in the same way as the footers below
\fancyfoot[L]{} % Empty left footer
\fancyfoot[C]{} % Empty center footer
\fancyfoot[R]{\thepage} % Page numbering for right footer
\renewcommand{\headrulewidth}{0pt} % Remove header underlines
\renewcommand{\footrulewidth}{0pt} % Remove footer underlines
\setlength{\headheight}{13.6pt} % Customize the height of the header

\numberwithin{equation}{section} % Number equations within sections (i.e. 1.1, 1.2, 2.1, 2.2 instead of 1, 2, 3, 4)
\numberwithin{figure}{section} % Number figures within sections (i.e. 1.1, 1.2, 2.1, 2.2 instead of 1, 2, 3, 4)
\numberwithin{table}{section} % Number tables within sections (i.e. 1.1, 1.2, 2.1, 2.2 instead of 1, 2, 3, 4)

\setlength\parindent{0pt} % Removes all indentation from paragraphs - comment this line for an assignment with lots of text

%----------------------------------------------------------------------------------------
%	TITLE SECTION
%----------------------------------------------------------------------------------------

\newcommand{\horrule}[1]{\rule{\linewidth}{#1}} % Create horizontal rule command with 1 argument of height

\title{
\normalfont \normalsize
\textsc{中国科学院大学}\ \textsc{计算机与控制学院} \\ [25pt] % Your university, school and/or department name(s)
\horrule{0.5pt} \\[0.4cm] % Thin top horizontal rule
\huge 图像处理与分析第四次作业 \\ % The assignment title
\horrule{2pt} \\[0.5cm] % Thick bottom horizontal rule
}

\author{黎吉国&201618013229046} % Your name

\date{\normalsize\today} % Today's date or a custom date

\begin{document}

\maketitle % Print the title

\newpage
\section{answer for 3.10 on page 114}
一幅图像的灰度PDF，$\rho_r(r)$示于下图，先对此图像进行灰度变换，使其灰度表达式为下面右图的$\rho_z(z)$。
假设灰度值连续，求完成这一要求的变换($r$到$z$).
\begin{figure}[H]
\centering
\includegraphics[width=3in,height=1.5in]{rho.jpg}
\caption{pdf}
\label{fig:graph}
\end{figure}
\textbf{Solution:}\\
对左图做直方图均衡：
\[ s=T(r)=\sum_0^r \rho_r(\omega)d\omega= -r^2+2r \]
对右图做直方图均衡：
\[ s=G(z)=\sum_0^z \rho_z(\omega)d\omega= z^2 \]
令$G(z)=s=T(r)$:
\[ z=\sqrt{-2r^2+2r} \]

\newpage
\section{answer for 2th}
计算卷积
\begin{itemize}
\item (1) $[1\ 2\ 3\ 4\ 5\ 4\ 3\ 2\ 1]*[2\ 0\ -2]$
\item (2)
\begin{equation*}
  \left(
\begin{array}{rrr}
  -1&0&1\\
  -2&0&2\\
  -1&0&1
  \end{array}
  \right)
  *
  \left(
  \begin{array}{rrrrr}
    1&3&2&0&4\\
    1&0&3&2&3\\
    0&4&1&0&5\\
    2&3&2&1&4\\
    3&1&0&4&2
  \end{array}
  \right)
\end{equation*}
\end{itemize}
\textbf{Solution:}
\begin{itemize}
\item (1)
\begin{align*}
&[1\ 2\ 3\ 4\ 5\ 4\ 3\ 2\ 1]*[2\ 0\ -2]\\
&=[ 1*2\quad 2*2+1*0\quad 3*2+2*0+1*(-2)\quad 4*2+3*0+2*(-2)\quad 5*2+4*0+3*(-2)\\
& 4*2+5*0+4*(-2)\quad 3*2+4*0+5*(-2)\quad 2*2+3*0+4*(-2)\quad 1*2+2*0+3*(-2)\\
& 1*0+2*(-2)\quad 1*(-2) ]\\
&=[2\quad 4\quad 4\quad 4\quad 4\quad 0\quad -4\quad -4\quad -4\quad -4\quad -2]
\end{align*}
\item (2)
\begin{equation*}
  \left(
\begin{array}{rrr}
  -1&0&1\\
  -2&0&2\\
  -1&0&1
  \end{array}
  \right)
  *
  \left(
  \begin{array}{rrrrr}
    1&3&2&0&4\\
    1&0&3&2&3\\
    0&4&1&0&5\\
    2&3&2&1&4\\
    3&1&0&4&2
  \end{array}
  \right)
  =\left(
  \begin{array}{rrrrrrr}
    -1&-3&-1&3&-2&0&4\\
    -3&-6&-4&4&-4&2&11\\
    -3&-7&-6&3&-6&4&15\\
    -3&-11&-4&8&-10&3&17\\
    -7&-11&2&5&-10&6&15\\
    -8&-5&6&-4&-6&9&8\\
    -3&-1&3&-3&-2&4&2
  \end{array}
  \right)
\end{equation*}
\end{itemize}
\newpage
\section{3th}
证明傅里叶变换的共轭对称性。即：\\
一个长为N的实数数组a，对其进行离散傅里叶变换得数组A，则A(i)与A(N-i)互为共轭，其i的取值与N的奇偶有关，详细如下：

1）N为偶数时，i=1,...,N/2-1，A(0)与A(N/2)各为其值，且肯定是实数；

2）N为奇数时，i=1,...,(N-1)/2，A(0)为实数\\

\textbf{证明:}\\
\[ F(u)=\frac{1}{M}\sum_{x=0}^{M-1}f(x)e^{-\frac{j2\pi ux}{M}} \]
\begin{equation*}
  \begin{split}
F(i)&=\frac{1}{M}\sum_{x=0}^{M-1}f(x)e^{-\frac{j2\pi ix}{M}}\\
F(M-i)&=\frac{1}{M}\sum_{x=0}^{M-1}f(x)e^{-\frac{j2\pi (M-i)x}{M}}\\
&=\frac{1}{M}\sum_{x=0}^{M-1}f(x) (e^{-j2\pi x} e^{\frac{j2\pi ix}{M}}  )\\
&=\frac{1}{M}\sum_{x=0}^{M-1}f(x)( e^{\frac{j2\pi ix}{M}} )\\
&=\overline{F(i)}
\end{split}
\end{equation*}





\end{document}
